import 'package:flutter/services.dart';

/// 系统级弹窗
class SystemToast {
  static const platform = MethodChannel('com.sainbainu.sainbainu/system_toast');

  static Future<void> showToast(String message) async {
    try {
      await platform.invokeMethod('showToast', {"message": message});
    } on PlatformException catch (e) {
      throw Exception("Failed to show toast: ${e.message}");
    }
  }
}
